
#ifndef __BASE_CONVERT_H
#define __BASE_CONVERT_H

#include <apr_base64.h>
#include "../db/KeyDB.h"

class BaseConvert
{
   public:
      static char *GetRandomBytes(int bytes);
      static char *ConvertBytesToBase64(const char *data, int bytes);
      static char *ConvertBytesToHexadecimal(const char *data, int bytes);
      static char *ConvertBase64ToBytes(const char *data, int bytes);
      static char *ConvertBase64ToBytes(const char *data, int *bytes);
      static char *ConvertHexadecimalToBytes(const char *data, int *bytes);
      static char *MakeBase64UUID(int bytes);
      static char *MakeHexUUID_PlusUniq_deprecated(int bytes, KeyDB *kdb);
      static char *MakeHexUUID_PlusUniq2(int bytes, KeyDB *kdb, KeyDB *kdb2);
      static char *MakeHexadecimalUUID(int bytes);
      static char *GetMD5Hash(const char *data, int length);
      static char *GetSHA1Hash(const char *data, int length);
      static char *XORBlockHashes(const char **hashes);
};

#endif
